From 5a496916c386bf1bd31ee841b76cb28d855716b9 Mon Sep 17 00:00:00 2001
From: MohamedBassem <me@mbassem.com>
Date: Sun, 24 Nov 2024 23:41:28 +0000
Subject: fix(mobile): Use keyboard avoiding view in the info page

---
 .../mobile/app/dashboard/bookmarks/[slug]/info.tsx | 27 ++++++++++++++--------
 1 file changed, 17 insertions(+), 10 deletions(-)

(limited to 'apps/mobile/app/dashboard/bookmarks/[slug]/info.tsx')

diff --git a/apps/mobile/app/dashboard/bookmarks/[slug]/info.tsx b/apps/mobile/app/dashboard/bookmarks/[slug]/info.tsx
index d573df21..ff2f6831 100644
--- a/apps/mobile/app/dashboard/bookmarks/[slug]/info.tsx
+++ b/apps/mobile/app/dashboard/bookmarks/[slug]/info.tsx
@@ -1,6 +1,8 @@
 import React from "react";
 import {
   Keyboard,
+  KeyboardAvoidingView,
+  Platform,
   Pressable,
   ScrollView,
   Text,
@@ -184,16 +186,21 @@ const ViewBookmarkPage = () => {
           ),
         }}
       />
-      <ScrollView className="h-screen w-full p-4">
-        <TouchableWithoutFeedback onPress={Keyboard.dismiss}>
-          <View className="gap-4 px-2">
-            <TitleEditor bookmarkId={bookmark.id} title={title ?? ""} />
-            <TagList bookmark={bookmark} />
-            <ManageLists bookmark={bookmark} />
-            <NotesEditor bookmark={bookmark} />
-          </View>
-        </TouchableWithoutFeedback>
-      </ScrollView>
+      <KeyboardAvoidingView
+        behavior={Platform.OS === "ios" ? "padding" : "height"}
+        className="pb-2"
+      >
+        <ScrollView className="h-screen w-full p-4">
+          <TouchableWithoutFeedback onPress={Keyboard.dismiss}>
+            <View className="gap-4 px-2">
+              <TitleEditor bookmarkId={bookmark.id} title={title ?? ""} />
+              <TagList bookmark={bookmark} />
+              <ManageLists bookmark={bookmark} />
+              <NotesEditor bookmark={bookmark} />
+            </View>
+          </TouchableWithoutFeedback>
+        </ScrollView>
+      </KeyboardAvoidingView>
     </CustomSafeAreaView>
   );
 };
-- 
cgit v1.3-1-g0d28

